@import "var";
@import "mixin";


/*广告box*/
.banner {

  padding: 1.15rem;
  background-color: $white;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: space-between;
  justify-items: center;
  position: relative;
  box-sizing: border-box;

  a {
    display: inline-block;
    width: (100%/5);
    line-height: 2.5rem;
    height: 2.5rem;
    overflow: hidden;

    img {
      width: 1.6rem;
      height: 1.6rem;
      margin-right: 0.5rem;
      vertical-align: middle;
    }
  }
}

/*广告下标*/
.ad-subscript {
  &::before {
    content: "站内广告";
    position: absolute;
    padding: 0 1.5rem;
    bottom: 0;
    right: 0;
    height: 1.8rem;
    line-height: 1.8rem;
    text-align: center;
    background-color: rgba($color: #cccccc, $alpha: 0.5);
    border-radius: 2rem 0 0 0;
    color: $white;
    z-index: 88;
  }
}

/*站内通知*/
.notice {
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  padding: 0.3rem 0;
  box-sizing: border-box;
  //background-color: $white;
  &-box {

    overflow: hidden;
    height: 2rem;
    display: flex;
    line-height: 2rem;
    justify-content: space-between;
    width: 100%;

    li {
      text-overflow: ellipsis;
      white-space: nowrap;
      word-wrap: normal;
      overflow: hidden;
    }
  }
}

/*分享按钮*/
.sidebar-share {
  ul {
    display: flex;
    flex-direction: row;
    background-color: $white;
    justify-content: space-between;
    padding: 1rem;

    li {
      padding: 0 1rem;
    }

  }
}

/*鸡汤*/
.chicken-soup {
  background-color: $white;
  overflow: hidden;
  padding: 1rem;

  .top {
    @include top;
  }

  .content {
    padding: .8rem 0;
    font-size: 1.4rem;
    line-height: 2rem;
  }

  .current-time {
    font-size: 1rem;
    color: #999999;
    padding: .8rem 0;

    span {
      font-weight: bold;
      color: #333333;
    }
  }

}

/*疫情图*/
.covid-19 {
  background-color: $white;
  overflow: hidden;
  padding: 1rem;

  .top {
    @include top;
  }

  .content {
    padding: .8rem 0;
    font-size: 1.4rem;
    line-height: 2rem;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-between;

    &-item {
      width: (100%/3);
      border-right: .1rem solid $light-grey;
      margin-left: -1rem;
      border-bottom: .1rem solid $light-grey;
      margin-top: -.1rem;
      display: flex;
      flex-direction: column;
      align-content: center;
      align-items: center;

      p:nth-child(1) {
        padding: .5rem 0;
        font-size: 1.2rem;
      }

      p:nth-child(2) {
        font-size: 2rem;
        font-weight: 900;
        padding: .5rem 0;
      }

      p:nth-child(3) {
        font-size: 1.4rem;
        font-weight: 500;
        padding: .5rem 0;
      }

      &:nth-child(3n) {
        border-right: none;
        margin-left: unset;
      }

    }

  }

  .update-time {
    font-size: 1rem;
    color: #999999;
    padding: .8rem 0;

    span {
      font-weight: bold;
      color: #333333;
    }
  }
}

/*头像*/
.person {
  position: relative;
  overflow: hidden;
  box-shadow: 5px 0 0 -5px #333;


  &-top {
    position: relative;
    padding: 0;
    display: block;
    flex-shrink: 0;

    &:after {
      content: '';
      display: block;
      padding-top: 40%;
    }

    &-bg {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      border: 0;
      background-image: url("https://s2.ax1x.com/2019/05/31/Vlw7B6.jpg");
      background-size: cover;
      background-repeat: no-repeat;
      background-position: 50% 50%;
      background-color: rgba(120, 120, 120, 0.1);
    }

    &-avatar {
      position: absolute;
      left: 50%;
      top: auto;
      bottom: 0;

      transform: translate(-50%, 50%);

      &-img {
        width: 10rem;
        height: 10rem;
        border-radius: 50%;
        border: .5rem solid $white;
        transition: all 0.8s;

        &:hover {
          transform: rotate(360deg);

        }
      }
    }
  }

  &-center {

    text-align: center;
    background: $white;
    padding-top: 6rem;
    padding-bottom: 1.8rem;
    line-height: 2rem;

    .person-name {
      display: inline-flex;
      align-items: center;
      font-size: 1.4rem;
    }

    .person-description {
      font-size: 1.2rem;
      color: #888888;
      line-height: 2.0rem;
      padding: 1.5rem 1.5rem 0 1.5rem;
    }
  }

  &-bottom {
    background: $white;
    text-align: center;

    ul {
      display: flex;
      align-content: center;
      align-items: center;
      justify-content: center;

      li {
        padding: 1rem 1.5rem;
      }
    }
  }
}

/*排行版*/
.rank {
  background-color: $white;
  overflow: hidden;
  padding: 1rem;


  .top {
    @include top;

    ul {
      display: flex;

      a {
        display: block;
        padding: 0 0.5rem;
      }

      .active {
        color: red;
      }
    }
  }

  .content {
    padding: .8rem 0;
    font-size: 1.4rem;
    line-height: 2rem;
    width: 100%;


    &-item {
      display: flex;
      justify-content: space-between;
      line-height: 4rem;
      position: relative;

      em {
        position: relative;
        font-family: "Impact";
        font-weight: 900;

        font-size: 1.6rem;
        display: block;
        width: 2rem;
        text-align: center;
        flex-shrink: 0;
        color: #9195A3;
      }

      p {
        width: 8.5rem;
        text-align: right;
      }

      a {
        width: 100%;
        @include hidden-text;
        padding: 0 1.5rem;
        position: relative;
        display: block;

        i {
          display: inline-block;
          padding: 0 0.2rem;
          text-align: center;
          vertical-align: middle;
          font-style: normal;
          color: red;
          overflow: hidden;
          line-height: 1rem;
          height: 1.6rem;
          font-size: 1.2rem;
          border-radius: .4rem;
          font-weight: 800;
          animation: heart .8s ease-in-out 1.3s infinite alternate;
        }
      }

    }
  }

  $rankcolor: (1:#fe2d46, 2:#f60, 3:#faa90e);
  @each $key, $value in $rankcolor {
    &-color-#{$key} {
      color: $value !important;
    }
  }
}

/*标签*/
.tags {
  background-color: $white;
  overflow: hidden;
  padding: 1rem;

  .top {
    @include top;
  }

  .content {
    padding: .8rem 0;
    font-size: 1.4rem;
    line-height: 1.4rem;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-between;

    a {
      @each $key,
      $value in $taglist {
        &:nth-child(7n+#{$key}) {
          background-color: $value
        }
      }
      color: $white;
      display: block;
      padding: 0.2rem .5rem;
      margin: .2rem;
      font-size: 1.3rem;

      &:hover {

        background: #333333;
      }
    }
  }

}

/*友链*/
.links {
  background-color: $white;
  overflow: hidden;
  padding: 1rem;


  .top {
    @include top;
  }

  .content {
    padding: .8rem 0;
    font-size: 1.4rem;
    line-height: 2rem;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;

    a {
      display: block;
      padding: 0.5rem 1rem;

      font-size: 1.3rem;

    }
  }

}

/*站内统计*/
.statistics {
  background-color: $white;
  overflow: hidden;
  padding: 1rem;

  .top {
    @include top;
  }

  .content {
    display: flex;
    flex-direction: column;

    &-item {
      display: flex;
      justify-content: space-between;
      line-height: 4rem;
      position: relative;
      align-items: center;
      border-bottom: 0.1rem solid #f6f6f6;

      .ic {
        font-size: 1.8rem;
      }

      em {
        padding: 0.2rem 1.5rem;
        font-size: 1.4rem;
        width: 100%;
      }

      p {
        padding: 0.2rem 1.5rem;
        font-size: 1.4rem;
      }

    }

  }
}

/*面包屑*/
.crumbs {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;

  a {
    .ic {
      font-size: 1.3rem;
      color: #9a9a9a !important;
    }

    display: inline;
    line-height: 1.5rem;
    font-size: 1.3rem;
    padding-right: 0.3rem;
  }
}

/*图片广告*/
.image-ad {
  position: relative;
  background-color: $white;
  overflow: hidden;
  padding: 1rem;
  height: auto;

  a {
    display: block;
    height: 100%;

    img {
      display: inline-block;
      vertical-align: middle;
      max-width: 100%
    }
  }
}

/*固定菜单*/
.fixed-menu {
  position: fixed;
  right: 0;
  bottom: 25%;

  &-item {
    cursor: pointer;
    width: 11rem;
    height: 5rem;
    background: $white;
    margin-bottom: .5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    right: -6.2rem;
    overflow: hidden;
    color: #333333;

    span {
      width: 100%;
      display: block;
      text-align: center;
      padding-right: 1rem;
    }

    &-box {
      display: none;
      flex-direction: row;
      position: absolute;
      right: 12rem;
      top: 0;
    }

    &-img {
      display: flex;
      flex-direction: column;
      width: 100px;
      height: 100px;
      margin-left: 5px;
      padding: 5px;
      background: url("../img/qrcode-bg.jpg");
      background-size: 100% 100%;
      background-position: center;
      background-repeat: no-repeat;

      img {
        max-width: 100%;
        margin-bottom: 0.5rem;
      }

      p {
        margin-top: .5rem;
        text-align: center;
      }
    }

  }

  .ic {
    width: 3.5rem;
    font-size: 2.8rem;
    padding: 1rem;
  }
}

/*评论*/
.comment {

  &-list {
    background-color: $white;
    overflow: hidden;
    padding: 1rem;

    .top {
      @include top;
    }

    .content {
      padding: .8rem 0;
      font-size: 1.4rem;
      line-height: 2rem;

      .comment-box {
        .el-avatar {
          overflow: hidden;
          margin-right: 2rem;

          img {
            transition: .3s all;
          }

          &:hover {
            img {
              transform: scale(1.1);
            }
          }
        }

        .comment-info {
          .reply-info {
            display: flex;
            align-items: center;
            width: 100%;
            padding: .5rem 0;

            * {
              padding: .1rem;
            }

            span {
              color: #8a8a8a;
            }

            .comment-content {
              padding-left: 1rem;
            }
          }

          .user-info {
            padding: .5rem 0;
          }

          width: 100%;
          display: flex;
          flex-direction: column;

          .comment-content {
            display: block;
            min-height: 2rem;
            background: #fafafa;
            color: #8a8a8a;
            font-size: 1.3rem;
            line-height: 2.5rem;
            overflow: hidden;
            text-overflow: ellipsis;
          }

          .comment-meta {
            display: flex;
            font-size: 1.2rem;
            color: #8a8a8a;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 0;

            .meta-info {
              display: flex;

              p, a {
                padding-right: 1rem;
              }
            }

            button {
              position: relative;
              float: right;
            }
          }
        }

        .top-comment {
          display: flex;

          .el-avatar {
            overflow: hidden;
            margin-right: 2rem;

            img {
              transition: .3s all;
            }

            &:hover {
              img {
                transform: scale(1.1);
              }
            }
          }

          .comment-info {
            width: 100%;
            display: flex;
            flex-direction: column;

            .comment-content {
              display: block;
              min-height: 2rem;
              background: #fafafa;
              color: #8a8a8a;
              font-size: 1.3rem;
              line-height: 2.5rem;
              overflow: hidden;
              text-overflow: ellipsis;
            }

            .comment-meta {
              display: flex;
            }
          }
        }

        .children-comment {
          display: flex;
          margin-left: 7.5rem;
          margin-top: 1rem;
        }
      }
    }

  }
}

/*会员中心导航条*/
.personal-center {
  background-color: $white;
  overflow: hidden;
  padding: 1rem;


  .content {
    padding: 0;
    font-size: 1.4rem;
    line-height: 2rem;
    display: flex;
    flex-direction: column;
    width: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;

    a {
      width: 100%;
      @include hidden-text;
      padding: 1.2rem 0;

      i {
        margin-right: 0.5rem;
      }

      &.active {
        color: red;
      }
    }
  }
}
